/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50717
 Source Host           : 127.0.0.1:3306
 Source Schema         : gouser

 Target Server Type    : MySQL
 Target Server Version : 50717
 File Encoding         : 65001

 Date: 30/07/2024 11:26:17
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for Account
-- ----------------------------
DROP TABLE IF EXISTS `Account`;
CREATE TABLE `Account` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `email` varchar(45) DEFAULT NULL COMMENT 'User email',
  `password` varchar(45) DEFAULT NULL COMMENT 'User Password',
  `salt` varchar(45) DEFAULT NULL COMMENT 'User salt',
  `status` varchar(255) DEFAULT NULL,
  `company` char(36) DEFAULT '0',
  `user` char(36) DEFAULT '0',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of Account
-- ----------------------------
BEGIN;
INSERT INTO `Account` VALUES ('1', 'test', '123456', '', NULL, 0, 0, '2024-07-24 07:01:22', '2024-07-24 07:01:27');
INSERT INTO `Account` VALUES ('5', 'test1234', '123456', NULL, NULL, 0, 0, '2024-07-23 12:20:41', '2024-07-24 23:32:36');
INSERT INTO `Account` VALUES ('6', 'test1234212', '123456', NULL, NULL, 0, 0, '2024-07-24 01:48:19', '2024-07-24 01:48:19');
COMMIT;

-- ----------------------------
-- Table structure for Application
-- ----------------------------
DROP TABLE IF EXISTS `Application`;
CREATE TABLE `Application` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `job` int(200) DEFAULT NULL COMMENT 'User email',
  `user` int(200) DEFAULT NULL,
  `answer` text,
  `resume` varchar(255) DEFAULT NULL,
  `chats` text,
  `status` varchar(255) DEFAULT NULL,
  `schedules` varchar(255) DEFAULT NULL,
  `apply_at` datetime DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for ApplicationChatMessage
-- ----------------------------
DROP TABLE IF EXISTS `ApplicationChatMessage`;
CREATE TABLE `ApplicationChatMessage` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `name` varchar(200) NOT NULL COMMENT 'User email',
  `message` varchar(200) DEFAULT NULL,
  `sender_id` char(36) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Certificate
-- ----------------------------
DROP TABLE IF EXISTS `Certificate`;
CREATE TABLE `Certificate` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `name` varchar(200) NOT NULL COMMENT 'User email',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Company
-- ----------------------------
DROP TABLE IF EXISTS `Company`;
CREATE TABLE `Company` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `account` char(36) DEFAULT NULL,
  `name` varchar(200) DEFAULT NULL COMMENT 'User Password',
  `description` varchar(200) DEFAULT NULL COMMENT 'User salt',
  `industry` varchar(200) DEFAULT NULL COMMENT 'User email',
  `tag` varchar(200) DEFAULT NULL,
  `address` varchar(200) DEFAULT NULL,
  `website` varchar(200) DEFAULT NULL,
  `city` varchar(200) DEFAULT NULL,
  `size` varchar(200) DEFAULT NULL,
  `contact` varchar(200) DEFAULT NULL,
  `logo` varchar(200) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
  FOREIGN KEY (`account`) REFERENCES Account(`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of Company
-- ----------------------------
BEGIN;
INSERT INTO `Company` VALUES (1, 1, 'test21212', 'terwtrwt', 'wrewr', 'rwer', 'rwer', NULL, NULL, NULL, NULL, NULL, NULL, '2024-07-25 00:34:30');
COMMIT;

-- ----------------------------
-- Table structure for CompanyAccounts
-- ----------------------------
DROP TABLE IF EXISTS `CompanyAccounts`;
CREATE TABLE `CompanyAccounts` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `user_id` char(36) DEFAULT NULL COMMENT 'User email',
  `company_id` char(36) DEFAULT NULL COMMENT 'User Password',
  `role_id` int(45) DEFAULT NULL COMMENT 'User salt',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
  FOREIGN KEY (`user_id`) REFERENCES User(`id`)
  FOREIGN KEY (`company_id`) REFERENCES Company(`id`)
  FOREIGN KEY (`role_id`) REFERENCES Role(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for CompanyPlan
-- ----------------------------
DROP TABLE IF EXISTS `CompanyPlan`;
CREATE TABLE `CompanyPlan` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `name` varchar(45) NOT NULL COMMENT 'User email',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for CompanySubscription
-- ----------------------------
DROP TABLE IF EXISTS `CompanySubscription`;
CREATE TABLE `CompanySubscription` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `company_id` char(36) DEFAULT NULL COMMENT 'User email',
  `company_plan` char(36) DEFAULT NULL,
  `status` varchar(200) DEFAULT NULL,
  `expiry` datetime DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
  FOREIGN KEY (`company_id`) REFERENCES Company(`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of CompanySubscription
-- ----------------------------
BEGIN;
INSERT INTO `CompanySubscription` VALUES (1, 1, 1, 'test1221', '2024-07-24 13:50:53', '2024-07-25 06:41:39', '2024-07-25 06:41:44');
COMMIT;

-- ----------------------------
-- Table structure for Education
-- ----------------------------
DROP TABLE IF EXISTS `Education`;
CREATE TABLE `Education` (
  `id` char(36) NOT NULL AUTO_INCREMENT,
  `start_date` datetime DEFAULT NULL,
  `end_date` datetime NOT NULL,
  `institute` char(36) NOT NULL,
  `institute_string` varchar(200) DEFAULT NULL,
  `level` varchar(200) DEFAULT NULL,
  `programme` varchar(200) DEFAULT NULL,
  `description` varchar(200) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Experience
-- ----------------------------
DROP TABLE IF EXISTS `Experience`;
CREATE TABLE `Experience` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `user_id` char(36) DEFAULT NULL,
  `start_date` varchar(200) DEFAULT NULL,
  `end_date` varchar(200) NOT NULL,
  `isPresent` char(36) DEFAULT NULL,
  `description` varchar(200) NOT NULL,
  `title` varchar(200) DEFAULT NULL,
  `company` char(36) DEFAULT NULL,
  `company_string` varchar(200) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`,`user_id`) USING BTREE
  FOREIGN KEY (`company`) REFERENCES Company(`id`)
  FOREIGN KEY (`user_id`) REFERENCES User(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Feature
-- ----------------------------
DROP TABLE IF EXISTS `Feature`;
CREATE TABLE `Feature` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `name` varchar(200) NOT NULL COMMENT 'User email',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Job
-- ----------------------------
DROP TABLE IF EXISTS `Job`;
CREATE TABLE `Job` (
  `id` char(36) NOT NULL AUTO_INCREMENT,
  `title` varchar(200) DEFAULT NULL,
  `company` char(36) DEFAULT NULL,
  `tag` varchar(200) DEFAULT NULL,
  `description` varchar(200) DEFAULT NULL,
  `level` varchar(200) DEFAULT NULL,
  `salary` varchar(200) DEFAULT NULL,
  `posted_at` datetime DEFAULT NULL,
  `location` varchar(200) DEFAULT NULL,
  `isRemote` char(36) DEFAULT '0',
  `isHybrid` char(36) DEFAULT '0',
  `expiry` datetime DEFAULT NULL,
  `question` varchar(200) DEFAULT NULL,
  `status` varchar(200) DEFAULT NULL,
  `created_by` char(36) DEFAULT NULL COMMENT 'Created Time',
  `updated_by` char(36) DEFAULT NULL COMMENT 'Updated Time',
  `update_at` datetime DEFAULT NULL,
  `create_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE USING BTREE
  FOREIGN KEY (`company`) REFERENCES Company(`id`)
  FOREIGN KEY (`user_id`) REFERENCES User(`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of Job
-- ----------------------------
BEGIN;
INSERT INTO `Job` VALUES (1, '1', '1', 'test1221', '2024-07-24 13:50:53', '2024-07-25 06:41:39', '2024-07-25 06:41:44', NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for JobQuestion
-- ----------------------------
DROP TABLE IF EXISTS `JobQuestion`;
CREATE TABLE `JobQuestion` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `question` varchar(45) NOT NULL COMMENT 'User email',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Media
-- ----------------------------
DROP TABLE IF EXISTS `Media`;
CREATE TABLE `Media` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `url` varchar(255) NOT NULL COMMENT 'User email',
  `key` varchar(255) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Notification
-- ----------------------------
DROP TABLE IF EXISTS `Notification`;
CREATE TABLE `Notification` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `recipient_id` char(36) NOT NULL COMMENT 'User email',
  `redirect` text,
  `title` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `status` varchar(200) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE USING BTREE
  FOREIGN KEY (`recipient_id`) REFERENCES Recipient(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Permission
-- ----------------------------
DROP TABLE IF EXISTS `Permission`;
CREATE TABLE `Permission` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `name` varchar(200) NOT NULL COMMENT 'User email',
  `category` varchar(200) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Resume
-- ----------------------------
DROP TABLE IF EXISTS `Resume`;
CREATE TABLE `Resume` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `media` varchar(45) NOT NULL COMMENT 'User email',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Role
-- ----------------------------
DROP TABLE IF EXISTS `Role`;
CREATE TABLE `Role` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `name` varchar(200) NOT NULL COMMENT 'User email',
  `status` varchar(200) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Schedule
-- ----------------------------
DROP TABLE IF EXISTS `Schedule`;
CREATE TABLE `Schedule` (
  `id` char(36) NOT NULL AUTO_INCREMENT,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime NOT NULL,
  `user` char(36) NOT NULL,
  `title` varchar(200) DEFAULT NULL,
  `company` varchar(200) DEFAULT NULL,
  `location` varchar(200) DEFAULT NULL,
  `link` varchar(200) DEFAULT NULL,
  `status` varchar(200) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE USING BTREE
  FOREIGN KEY (`company`) REFERENCES Company(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for Skill
-- ----------------------------
DROP TABLE IF EXISTS `Skill`;
CREATE TABLE `Skill` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `name` varchar(45) NOT NULL COMMENT 'User email',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for SuggestSkill
-- ----------------------------
DROP TABLE IF EXISTS `SuggestSkill`;
CREATE TABLE `SuggestSkill` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `role_id` char(36) NOT NULL COMMENT 'User email',
  `feature_id` char(36) DEFAULT NULL,
  `allow` int(1) DEFAULT '0',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
  FOREIGN KEY (`role_id`) REFERENCES Role(`id`)
  FOREIGN KEY (`feature_id`) REFERENCES Feature(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for User
-- ----------------------------
DROP TABLE IF EXISTS `User`;
CREATE TABLE `User` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `account` char(36) DEFAULT NULL,
  `firstname` varchar(45) DEFAULT NULL COMMENT 'User Password',
  `lastname` varchar(45) DEFAULT NULL COMMENT 'User salt',
  `nationality` varchar(45) DEFAULT NULL COMMENT 'User email',
  `resumes` char(36) DEFAULT NULL,
  `experiences` char(36) DEFAULT NULL,
  `profile_picture` char(36) DEFAULT NULL,
  `certificates` char(36) DEFAULT NULL,
  `educations` char(36) DEFAULT NULL,
  `skills` char(36) DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
  FOREIGN KEY (`account`) REFERENCES Account(`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of User
-- ----------------------------
BEGIN;
INSERT INTO `User` VALUES (1, 1, 'test', 'test', 'test', 0, 0, NULL, NULL, NULL, NULL, '2024-07-24 07:01:40', '2024-07-24 07:01:45');
COMMIT;

-- ----------------------------
-- Table structure for UserPlan
-- ----------------------------
DROP TABLE IF EXISTS `UserPlan`;
CREATE TABLE `UserPlan` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `name` varchar(45) NOT NULL COMMENT 'User email',
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for UserSubcription
-- ----------------------------
DROP TABLE IF EXISTS `UserSubcription`;
CREATE TABLE `UserSubcription` (
  `id` char(36) NOT NULL COMMENT 'User ID',
  `user_id` char(36) NOT NULL COMMENT 'User email',
  `user_plan` char(36) DEFAULT NULL,
  `status` varchar(200) DEFAULT NULL,
  `expiry` datetime DEFAULT NULL,
  `create_at` datetime DEFAULT NULL COMMENT 'Created Time',
  `update_at` datetime DEFAULT NULL COMMENT 'Updated Time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of UserSubcription
-- ----------------------------
BEGIN;
INSERT INTO `UserSubcription` VALUES (1, 1, 1, 'test1221', '2024-07-24 13:50:53', '2024-07-25 06:41:39', '2024-07-25 06:41:44');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
